package io.renren.modules.job.task.basedata;

import io.renren.modules.basedata.service.UserUpService;
import io.renren.modules.job.task.ITask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("userTask")
public class UserTask implements ITask {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private UserUpService userUpService;
    @Override
    public void run(String params) {
        logger.info("开始执行任务:"+System.currentTimeMillis());
        try {
            logger.info(userUpService.userUpload());
        }catch (Exception e){
            logger.error(e.getMessage());
        }finally {
            logger.info("完成任务:"+System.currentTimeMillis());
        }
    }
}
